<?php

namespace mForge\Modules\Cache;

interface ICacheHandler
{
    /**
     * Cleans/removes the cache with the key $id.
     *
     * @param mixed $id
     */
    public function clean($id);

    /**
     * 
     */
    public function cleanAll();

    /**
     * Loads the cache with key $id. Should return null if no cache is loaded.
     *
     * @param mixed $id
     * @return null|mixed
     */
    public function load($id);

    /**
     * Saves $data to the cache.
     *
     * @param mixed $id
     * @param mixed $data
     */
    public function save($id, $data);
}